import {createRouter, createWebHistory} from "vue-router";
import LoginView from "../views/LoginView.vue";
import HomeView from "../views/HomeView.vue";
import NewView from "../views/NewView.vue";
import WriteView from "../views/WriteView.vue";
import ListView from "@/views/ListView.vue";
import StartView from "@/views/StartView.vue";
import ShareView from "@/views/ShareView.vue";
import TrashBin from "@/views/TrashBin.vue";

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: "/",
            name: "start",
            component: StartView,
        }, {
            path: "/login",
            name: "login",
            component: LoginView,
        }, {
            path: "/home",
            name: "home",
            component: HomeView,
        }, {
            path: "/new",
            name: "new",
            component: NewView,
        }, {
            path: "/collect/:qid?",
            name: "write",
            component: WriteView,
        }, {
            path: "/list",
            name: "list",
            component: ListView,
        }, {
            path: "/share",
            name: "share",
            component: ShareView,
        }, {
            path: "/trash",
            name: "trash",
            component: TrashBin,
        }
    ],
});

export default router;
